package com.changgou.goods.feign;

import com.changgou.entity.Result;
import com.changgou.goods.pojo.Spu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "goods")
public interface SpuFeign {

    @GetMapping("/spu/findBySpuId/{spuId}")
    public Result<Spu> findBySpuId(@PathVariable("spuId") String spuId);


    @GetMapping("/spu")
    public Result<List<Spu>> findAll();

}
